{% macro entry(entry,show_comments=False) -%}
<div class="entry">
  <div style="float: right;">
	<img src="http://chart.apis.google.com/chart?cht=qr&amp;chs=74x74&amp;chl={{web.ctx.home + '/qr/' + entry.idurl() | urlencode}}" alt="http://chart.apis.google.com/chart?cht=qr&amp;chs=74x74&amp;chl={{web.ctx.home + '/qr/' + entry.idurl() | urlencode}}"/>
  </div>
  <h1><a href="/entry/{{ entry.slugurl() }}">{{ entry.title | e }}</a></h1>
  <div class="info">
      <div class="tags">
          {% for t in entry.tagurls %}
            <a href="/tag/{{ t.url }}">{{t| e}}</a>
          {% endfor %}
      </div>
      <div>
	      By Yao Chunlin &middot; {{ entry.published | datetimeformat }}
      </div>
  </div>
  <div class="body">{{ entry.body }}</div>
  
  {% if not show_comments %}
    <div class="footer">
      <a href="/entry/{{ entry.slugurl() }}#disqus_thread">Comments</a>
    </div>
  {% endif %}
  {% if users.get_current_user() and users.is_current_user_admin() %}
    <div class="footer">
      <a href="/compose?key={{ entry.slugurl() }}">编辑</a>
    </div>
  {% endif %}
  {% if show_comments %}
      {% if not settings.debug %}
      <div id="comment"><div id="disqus_thread"></div></div>
    <script src="http://disqus.com/forums/yao-blog/embed.js" type="text/javascript" language="javascript" ></script>
      {% endif %}
  {% endif %}
</div>
{%- endmacro %}

